Path: blob/master/src/packages/next/pages/auth/verify/[token].tsx
1451 views
/*1* This file is part of CoCalc: Copyright © 2021 Sagemath, Inc.2* License: MS-RSL – see LICENSE.md for details3*/45// Password reset page67// WARNING: this can't work and isn't used – no idea what's going on here.8// as of 2022-07: hub/auth.ts is handing the `/auth/verify?email=...&token=...` route to the verify email addresses.910import { Layout } from "antd";11import RedeemVerify from "components/auth/redeem-verify-email";12import Footer from "components/landing/footer";13import Head from "components/landing/head";14import Header from "components/landing/header";15import { Customize } from "lib/customize";16import withCustomize from "lib/with-customize";17import { useRouter } from "next/router";1819export default function PasswordReset({ token, customize }) {20const router = useRouter();21const { email } = router.query;2223return (24<Customize value={customize}>25<Head title={"Verify Email Address"} />26<Layout>27<Header />28<Layout.Content style={{ backgroundColor: "white" }}>29<RedeemVerify token={token} email_address={`${email}`} />30<Footer />31</Layout.Content>32</Layout>33</Customize>34);35}3637export async function getServerSideProps(context) {38const { token } = context.params;39return await withCustomize({40context,41props: { token },42});43}444546